Unfolding Semantics of the Untyped {\lambda}-Calculus with letrec
نویسنده
چکیده
In this thesis we investigate the relationship between finite terms in λletrec, the λ-calculus with letrec, and the infinite λ-terms they express. We say that a λletrec-term expresses a λ-term if the latter can be obtained as an infinite unfolding of the former. Unfolding is the process of substituting occurrences of function variables by the right-hand side of their definition. We consider the following questions: (i) How can we characterise those infinite λ-terms that are λletrec-expressible? (ii) given two λletrec-terms, how can we determine whether they have the same unfolding? (iii) given a λletrec-term, can we find a more compact version of the term with the same unfolding? To tackle these questions we introduce and study the following formalisms: ○ a rewriting system for unfolding λletrec-terms into λ-terms ○ a rewriting system for ‘observing’ λ-terms by dissecting their term structure ○ higher-order and first-order graph formalisms together with translations between them as well as translations from and to λletrec We identify a first-order term graph formalism on which bisimulation preserves and reflects the unfolding semantics of λletrec and which is closed under functional bisimulation. From this we derive efficient methods to determine whether two terms are equivalent under infinite unfolding and to compute the maximally shared form of a given λletrec-term.
منابع مشابه
Simulation in the Call-by-Need Lambda-Calculus with Letrec, Case, Constructors, and Seq
This paper shows equivalence of several versions of applicative similarity and contextual approximation, and hence also of applicative bisimilarity and contextual equivalence, in LR, the deterministic call-by-need lambda calculus with letrec extended by data constructors, case-expressions and Haskell’s seq-operator. LR models an untyped version of the core language of Haskell. The use of bisimi...
متن کاملContextual Equivalence in Lambda-Calculi extended with letrec and with a Parametric Polymorphic Type System
This paper describes a method to treat contextual equivalence in polymorphically typed lambda-calculi, and also how to transfer equivalences from the untyped versions of lambda-calculi to their typed variant, where our specific calculus has letrec, recursive types and is nondeterministic. An addition of a type label to every subexpression is all that is needed, together with some natural constr...
متن کاملReasoning about Contextual Equivalence: From Untyped to Polymorphically Typed Calculi
This paper describes a syntactical method for contextual equivalence in polymorphically typed lambda-calculi. Our specific calculus has letrec as cyclic let, data constructors, case-expressions, seq, and recursive types. The typed language is a subset of the untyped language. Normal-order reduction is defined for the untyped language. Since there are less typed contexts the typed contextual pre...
متن کاملOn the denotational semantics of the untyped lambda-mu calculus
Starting with the idea of reflexive objects in Selinger’s control categories, we define three different denotational models of Parigot’s untyped lambda-mu calculus. The first one is built from an intersection types system for the lambda-mu calculus leading to a generalization of Engeler’s model of the untyped lambda calculus. The second model introduces correlation spaces (coming from Girard’s ...
متن کاملSimulation in the Call-by-Need Lambda-Calculus with letrec
This paper shows the equivalence of applicative similarity and contextual approximation, and hence also of bisimilarity and contextual equivalence, in the deterministic call-by-need lambda calculus with letrec. Bisimilarity simplifies equivalence proofs in the calculus and opens a way for more convenient correctness proofs for program transformations. Although this property may be a natural one...
متن کامل